{% extends "base.html" %}

{% block stylesheets %}
	<link rel="stylesheet" href="{{ url_for('views.themes', path='css/challenge-board.css') }}">
{% endblock %}

{% block content %}

<div class="section section-standard" id="notifications">
    <div class="section-inner">
        <div class="section-header" data-100p-top="transform[swing]:translateY(-25px);opacity[swing]:0" data-75p-top="transform[swing]:translateY(0);opacity[swing]:1">
            <h3>题目</h3>
            <div class="divider">//</div>
        </div>

		{% if infos %}
			<div class="container">
				<div id='errors' class="row">
					<div class="col-md-12">
						{% for info in infos %}
							<h1 class="text-center">{{ info }}</h1>
						{% endfor %}
					</div>
				</div>
			</div>
		{% endif %}

		{% if errors %}
		<div class="container">
			<div id='errors' class="row">
				<div class="col-md-12">
		{% for error in errors %}
					<h1 class="text-center">{{ error }}</h1>
		{% endfor %}
				</div>
			</div>
		</div>
		{% endif %}

		{% if admin or not errors %}
		<div class="container">
			<div id='challenges-board'>
				<div class="text-center">
					<i class="fas fa-circle-notch fa-spin fa-3x fa-fw spinner"></i>
				</div>
			</div>
		</div>

		<input id="nonce" type="hidden" name="nonce" value="{{ nonce }}">

		<div class="modal fade" id="challenge-window" tabindex="-1" role="dialog">
		</div>
	</div>
</div>
{% endif %}
{% endblock %}

{% block scripts %}
	<script>
		var authed = {{ (id is defined) | tojson }};
	</script>
	<script src="{{ url_for('views.themes', path='js/utils.js') }}"></script>
	<script src="{{ url_for('views.themes', path='js/multi-modal.js') }}"></script>
	{% if admin or not errors %}
	<script src="{{ url_for('views.themes', path='js/challenges.js') }}"></script>
	<script src="{{ url_for('views.themes', path='js/hints.js') }}"></script>
	{% endif %}
	<script src="{{ url_for('views.themes', path='js/style.js') }}"></script>
{% endblock %}
